Skip to content

Various changes#18

Merged
nickmisasi merged 14 commits intomasterfrom
aws-session-token
Oct 7, 2025
Merged

Various changes#18
nickmisasi merged 14 commits intomasterfrom
aws-session-token

Conversation

@nickmisasi
Copy link
Copy Markdown
Contributor

Summary

Updates:

  • adds support for AWS Session tokens in auth
  • Removes telemetry
  • Adds support for creation of a Mattermost workspace using a pre-existing secret (in the case of external secrets managers)

Screenshots

Ticket Link

Release Note


@nickmisasi nickmisasi requested a review from Copilot October 2, 2025 02:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements several significant updates to the cloud-native bootstrapper: adds AWS session token support for temporary credentials, removes telemetry functionality entirely, and introduces support for using pre-existing Kubernetes secrets for Mattermost workspace creation.

  • Adds AWS session token support throughout the authentication flow and credential management
  • Completely removes telemetry infrastructure including APIs, hooks, and backend components
  • Adds capability to use existing Kubernetes secrets for database and filestore configurations

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
webapp/src/types/bootstrapper.ts Adds sessionToken field to CloudCredentials type
webapp/src/types/Installation.ts Adds optional secret field to S3FileStore interface
webapp/src/store/installation/bootstrapperSlice.ts Updates initialState to include empty sessionToken
webapp/src/store/index.ts Removes telemetryApi from store configuration
webapp/src/pages/setup/setup.scss Adds styling for session info display
webapp/src/pages/setup/index.tsx Implements server-side session checking and UI updates
webapp/src/pages/setup/get_credentials.tsx Adds session token input fields
webapp/src/pages/mattermost/filestore_connection.tsx Adds existing secret toggle functionality
webapp/src/pages/mattermost/db_connection.tsx Adds existing secret support for database connections
webapp/src/pages/mattermost/create_workspace.tsx Updates validation logic for secret-based configurations
webapp/src/pages/aws/choose_existing.tsx Adds refetch functionality and improves region selection
telemetry/telemetry.go Removes entire telemetry package
providers/aws.go Integrates session token support throughout AWS authentication
model/mattermost.go Adds secret name fields and validation logic
model/cluster.go Adds SessionToken field to Credentials struct
api/state.go Adds session check endpoint and state update functions
api/context.go Removes telemetry provider from context
api/bootstrapper.go Updates credential handling and Mattermost operator configuration
api/api.go Removes telemetry API initialization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 5 to 12
type Props = {
cloudProvider: string;
kubernetesOption: string;
onCredentialsChange: (credentials: { accessKeyId: string, accessKeySecret: string, kubeconfig: string }) => void;
onCredentialsChange: (credentials: { accessKeyId: string, accessKeySecret: string, sessionToken: string, kubeconfig: string }) => void;
};

function GetCredentials({ cloudProvider, kubernetesOption, onCredentialsChange }: Props) {
const [credentials, setCredentials] = useState({
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline type definition is duplicated and inconsistent with the credentials state object which includes kubeconfigType. Consider extracting this to a shared type or interface to maintain consistency.

Copilot uses AI. Check for mistakes.
const filestoreConnectionComplete = filestoreComplete();

if (dbConnection.dbConnectionOption === 'Existing' && !!dbConnection.existingDatabaseConfig?.dbConnectionString && !!dbConnection.existingDatabaseConfig?.dbReplicasConnectionString) {
if (dbConnection.dbConnectionOption === 'Existing' && (dbConnection.existingDatabaseSecretName || (!!dbConnection.existingDatabaseConfig?.dbConnectionString && !!dbConnection.existingDatabaseConfig?.dbReplicasConnectionString))) {
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This complex boolean logic is difficult to read and maintain. Consider extracting this validation into a separate function like isDatabaseConnectionComplete() for better readability.

Copilot uses AI. Check for mistakes.
@@ -1219,11 +1246,11 @@ func handleDeployMattermostOperator(c *Context, w http.ResponseWriter, r *http.R
}
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented-out version should either be removed if no longer needed, or the comment should explain why it's commented out and under what conditions it should be used.

Suggested change
}
UpgradeCRDs: true,
// To pin the chart to a specific version, uncomment the line below and set the desired version.

Copilot uses AI. Check for mistakes.
@nickmisasi nickmisasi requested a review from fmartingr October 3, 2025 17:33
@nickmisasi nickmisasi merged commit 1d2b748 into master Oct 7, 2025
1 check passed
@nickmisasi nickmisasi deleted the aws-session-token branch October 7, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants